apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-iot-run
  labels:
    name: app-iot
    app: app-iot
spec:
  replicas: 1
  selector:
    matchLabels:
      app: app-iot
  template:
    metadata:
      labels:
        app: app-iot
    spec:
      containers:
      - name: app-iot
        image: ghcr.io/djsasha777/iot/iot/iotbackend:0741895
        resources:
          limits:
            memory: "1Gi"
            cpu: "1000m"
          requests:
            memory: "200Mi"
            cpu: "200m"
        ports:
        - containerPort: 8088
        env:
        - name: MONGO_MONGODB_USERNAME
          valueFrom:
            secretKeyRef:
              name: mongo-secret
              key: mongo-user
        - name: MONGO_MONGODB_PASSWORD
          valueFrom:
            secretKeyRef:
              name: mongo-secret
              key: mongo-password
        - name: MONGO_MONGODB_SERVER
          value: mongodb-svc
        - name: MONGO_MONGODB_DATABASE
          value: iotdatabase